<HTML>
<HEAD>
<TITLE>JavaScript Source Code 3000:  Misc.:  Julius Caesar Madlib</TITLE>
<META HTTP-EQUIV="JavaScript Source Code 3000" CONTENT = "no-cache">
<META NAME="date" CONTENT="2000-09-09">
<META NAME="channel" CONTENT="Web Developer">
<META NAME="author" CONTENT="JavaScript Source Code 3000">
<META NAME="section" CONTENT="Miscellaneous">
<META NAME="description" CONTENT="Almost all of us have played that funny Madlib game.  But, how many of us have played it in JavaScript?  So, be the first on your block to play Madlibs - JavaScript enhanced!">


<SCRIPT LANGUAGE = "JavaScript">
<!-- Begin
function CreateWindow() {
msgWindow=window.open("","displayWindow","toolbar=no,width=350,height=375,directories=no,status=no,scrollbars=yes,resize=no,menubar=no")
}  
function create(form) {
var start="go";
if (start=="go") {
alert('Here we go...');
text = ("<HEAD><TITLE>Mark Anthony's Address from 'Julius Caesar' </TITLE> </HEAD>");
text += ("<BODY BGCOLOR =  '#FFFFFF'><CENTER><B><FONT FACE = 'Arial' SIZE = 4>");
text += ("Mark Anthony's Address from<BR> 'Julius Caesar' </FONT></B></CENTER><BR>");
text += ("Friends, Romans, " +form.input1.value+ " lend me your " +form.input2.value+ "; ");
text += ("I come to " +form.input3.value+ " Caesar, not to praise him. ");
text += ("The evil that men do lives after them, the good is oft interred with their " +form.input4.value+ "; ");
text += ("so let it be with " +form.input5.value+ ". " );
text += ("The noble Brutus hath told you Caesar was "  +form.input6.value+ "; if it were so, it was a grievous fault. ");
text += ("If you have " +form.input7.value+ ", prepare to shed them now. ");
text += ("You all do know this " +form.input8.value+ ". ");
text += ("I remember the first time Caesar put it on. ");
text += ("Through this well-beloved Brutus stabbed; for Brutus, as you know, was Caesar's " +form.input9.value+ ": ");
text += ("this was the unkindest " +form.input10.value+ " of all. ");
text += ("Here is the " +form.input11.value+ ", under Caesar's seal. To every Roman " +form.input12.value+ " he gives, ");
text += ("to every several man, seventy five " +form.input13.value+ ". ");
text += ("Here was a/an " +form.input14.value+ "! When comes another?");
msgWindow=window.open("","displayWindow","toolbar=no,width=375,height=480,directories=no,status=no,scrollbars=yes,resize=no,menubar=no")
msgWindow.document.write(text)
msgWindow.document.close()
   }
}
// End -->
</SCRIPT>
</HEAD>

<BODY BGCOLOR=#ffffff vlink=#0000ff>

<BR>
<center>
<table width="600" cellpadding="0" cellspacing="10">
<tr>
<td width="468" align="center">

	
</td>
<td width="120" align="center">

	
</td>
</tr>
</table>
<BR>
<BR>
<BASEFONT SIZE=3>
  <FONT SIZE=6>
<B><FONT SIZE="+2" FACE="Helvetica,Arial" ALIGN=RIGHT COLOR="#0000FF">
<b><A HREF="../index.htm" /" TARGET="_top">
Home</A> </b><img src="../img/arrow.gif" /img/arrow.gif" height=13 width=7 border=0 alt="}"> <b><A HREF="index.htm" /miscellaneous/"><font color="#FF0000">Miscellaneous</font></A> </b>
<img src="../img/arrow.gif" /img/arrow.gif" height=13 width=7 border=0 alt="}"> <FONT COLOR="#006666">Julius Caesar Madlib</FONT></b></FONT><BR>
</B><BR>
  </FONT>
<TABLE BORDER=0 WIDTH=500 CELLPADDING=3 CELLSPACING=0>
<tr><td><font FACE=" helvetica,arial,geneva">
<br>
<br>
<!-- Description --><!--content_start-->

Almost all of us have played that funny Madlib game.  But, how many of us have played it in JavaScript?  So, be the first on your block to play Madlibs - JavaScript enhanced!<br><hr>
</td></tr>
</table>
<!--  Demonstration -->
<BODY>
<CENTER>
Fill in the form, and then press the button for your own Julius Caesar Madlib.<BR><BR>
<BLOCKQUOTE>
<FORM>
<TABLE BORDER = 0 CELLPADDING = 2>
<TR><TD>
Plural Noun:<TD><INPUT TYPE="text" NAME="input1" SIZE=20><BR>
<TR><TD>
Part of body (plural):<TD><INPUT TYPE="text" NAME="input2" SIZE=20 ><BR>
<TR><TD>
Verb:<TD><INPUT TYPE="text" NAME="input3" SIZE=20 ><BR>
<TR><TD>
Name:<TD><INPUT TYPE="text" NAME="input4" SIZE=20 ><BR>
<TR><TD>
Name of Polictician:<TD><INPUT TYPE="text" NAME="input5" SIZE=20 ><BR>
<TR><TD>
Adjective:<TD><INPUT TYPE="text" NAME="input6" SIZE=20 ><BR>
<TR><TD>
Article of Clothing:<TD><INPUT TYPE="text" NAME="input7" SIZE=20 ><BR>
<TR><TD>
Article of Clothing:<TD><INPUT TYPE="text" NAME="input8" SIZE=20 ><BR>
<TR><TD>
Occupation:<TD><INPUT TYPE="text" NAME="input9" SIZE=20 ><BR>
<TR><TD>
Noun:<TD><INPUT TYPE="text" NAME="input10" SIZE=20 ><BR>
<TR><TD>
Noun:<TD><INPUT TYPE="text" NAME="input11" SIZE=20 ><BR>
<TR><TD>
Noun:<TD><INPUT TYPE="text" NAME="input12" SIZE=20 ><BR>
<TR><TD>
Animal (plural):<TD><INPUT TYPE="text" NAME="input13" SIZE=20 ><BR>
<TR><TD>
A Food:<TD><INPUT TYPE="text" NAME="input14" SIZE=20 ><BR>
</TABLE>
<BR><BR>
<INPUT TYPE="button" VALUE="Create Window" ONCLICK="create(this.form)">
</CENTER>
</FORM>
</BLOCKQUOTE>
<P>
<BR>
<P>
<a name="source">
<TABLE BORDER=0 WIDTH=500 CELLPADDING=3 CELLSPACING=0>
<tr><td BGCOLOR=yellow><font FACE="helvetica,arial,geneva"><b>JavaScript Source Code 3000:  Misc.:  Julius Caesar Madlib</b>
<p>Simply click inside the window below, use your cursor to highlight the script, and copy (type Control-c or Apple-c) the script into a new file in your text editor (such as NotePad or SimpleText) and save (Control-s or Apple-s).  The script is yours!<br><br></font></td></tr>
<tr><td BGCOLOR=yellow ALIGN=CENTER>
<form NAME="copy">

<DIV align="center">
<input type=button value="Highlight All" onClick="javascript:this.form.txt.focus();this.form.txt.select();">&nbsp;&nbsp;&nbsp;&nbsp;
<INPUT TYPE="text" NAME="total" VALUE="Script Size:  3.67 KB  " size="24">
</DIV>

<textarea NAME="txt" ROWS=20 COLS=75 WRAP=VIRTUAL>

&lt;!-- TWO STEPS TO INSTALL JULIUS CAESAR MADLIB:

   1.  Paste the coding into the HEAD of your HTML document
   2.  Add the last code into the BODY of your HTML document  --&gt;

&lt;!-- STEP ONE: Copy this code into the HEAD of your HTML document  --&gt;

&lt;HEAD&gt;

&lt;SCRIPT LANGUAGE="JavaScript"&gt;

&lt;! &gt;
&lt;! &gt;

&lt;!-- Begin
function CreateWindow() {
msgWindow=window.open("","displayWindow","toolbar=no,width=350,height=400,directories=no,status=no,scrollbars=yes,resize=no,menubar=no")
}  
function create(form) {
var start="go";
if (start=="go") {
alert('Here we go...');
text = ("&lt;HEAD&gt;&lt;TITLE&gt;Mark Anthony's Address from 'Julius Caesar' &lt;/TITLE&gt; &lt;/HEAD&gt;");
text += ("&lt;BODY BGCOLOR =  '#FFFFFF'&gt;&lt;CENTER&gt;&lt;B&gt;&lt;FONT FACE = 'Arial' SIZE = 4&gt;");
text += ("Mark Anthony's Address from&lt;BR&gt; 'Julius Caesar' &lt;/FONT&gt;&lt;/B&gt;&lt;/CENTER&gt;&lt;BR&gt;");
text += ("Friends, Romans, " +form.input1.value+ " lend me your " +form.input2.value+ "; ");
text += ("I come to " +form.input3.value+ " Caesar, not to praise him. ");
text += ("The evil that men do lives after them, the good is oft interred with their " +form.input4.value+ "; ");
text += ("so let it be with " +form.input5.value+ ". " );
text += ("The noble Brutus hath told you Caesar was "  +form.input6.value+ "; if it were so, it was a grievous fault. ");
text += ("If you have " +form.input7.value+ ", prepare to shed them now. ");
text += ("You all do know this " +form.input8.value+ ". ");
text += ("I remember the first time Caesar put it on. ");
text += ("Through this well-beloved Brutus stabbed; for Brutus, as you know, was Caesar's " +form.input9.value+ ": ");
text += ("this was the unkindest " +form.input10.value+ " of all. ");
text += ("Here is the " +form.input11.value+ ", under Caesar's seal. To every Roman " +form.input12.value+ " he gives, ");
text += ("to every several man, seventy five " +form.input13.value+ ". ");
text += ("Here was a/an " +form.input14.value+ "! When comes another?");
msgWindow=window.open("","displayWindow","toolbar=no,width=375,height=480,directories=no,status=no,scrollbars=yes,resize=no,menubar=no")
msgWindow.document.write(text)
msgWindow.document.close()
   }
}
// End --&gt;
&lt;/SCRIPT&gt;

&lt;!-- STEP TWO: Put this code into the BODY of your HTML document  --&gt;

&lt;BODY&gt;

&lt;CENTER&gt;
Fill in the form, and then press the button for your own Julius Caesar Madlib.&lt;BR&gt;&lt;BR&gt;
&lt;BLOCKQUOTE&gt;
&lt;FORM&gt;
&lt;TABLE BORDER = 0 CELLPADDING = 2&gt;
&lt;TR&gt;&lt;TD&gt;
Plural Noun:&lt;TD&gt;&lt;INPUT TYPE="text" NAME="input1" SIZE=20&gt;&lt;BR&gt;
&lt;TR&gt;&lt;TD&gt;
Part of body (plural):&lt;TD&gt;&lt;INPUT TYPE="text" NAME="input2" SIZE=20 &gt;&lt;BR&gt;
&lt;TR&gt;&lt;TD&gt;
Verb:&lt;TD&gt;&lt;INPUT TYPE="text" NAME="input3" SIZE=20 &gt;&lt;BR&gt;
&lt;TR&gt;&lt;TD&gt;
Name:&lt;TD&gt;&lt;INPUT TYPE="text" NAME="input4" SIZE=20 &gt;&lt;BR&gt;
&lt;TR&gt;&lt;TD&gt;
Name of Polictician:&lt;TD&gt;&lt;INPUT TYPE="text" NAME="input5" SIZE=20 &gt;&lt;BR&gt;
&lt;TR&gt;&lt;TD&gt;
Adjective:&lt;TD&gt;&lt;INPUT TYPE="text" NAME="input6" SIZE=20 &gt;&lt;BR&gt;
&lt;TR&gt;&lt;TD&gt;
Article of Clothing:&lt;TD&gt;&lt;INPUT TYPE="text" NAME="input7" SIZE=20 &gt;&lt;BR&gt;
&lt;TR&gt;&lt;TD&gt;
Article of Clothing:&lt;TD&gt;&lt;INPUT TYPE="text" NAME="input8" SIZE=20 &gt;&lt;BR&gt;
&lt;TR&gt;&lt;TD&gt;
Occupation:&lt;TD&gt;&lt;INPUT TYPE="text" NAME="input9" SIZE=20 &gt;&lt;BR&gt;
&lt;TR&gt;&lt;TD&gt;
Noun:&lt;TD&gt;&lt;INPUT TYPE="text" NAME="input10" SIZE=20 &gt;&lt;BR&gt;
&lt;TR&gt;&lt;TD&gt;
Noun:&lt;TD&gt;&lt;INPUT TYPE="text" NAME="input11" SIZE=20 &gt;&lt;BR&gt;
&lt;TR&gt;&lt;TD&gt;
Noun:&lt;TD&gt;&lt;INPUT TYPE="text" NAME="input12" SIZE=20 &gt;&lt;BR&gt;
&lt;TR&gt;&lt;TD&gt;
Animal (plural):&lt;TD&gt;&lt;INPUT TYPE="text" NAME="input13" SIZE=20 &gt;&lt;BR&gt;
&lt;TR&gt;&lt;TD&gt;
A Food:&lt;TD&gt;&lt;INPUT TYPE="text" NAME="input14" SIZE=20 &gt;&lt;BR&gt;
&lt;/TABLE&gt;
&lt;BR&gt;&lt;BR&gt;
&lt;INPUT TYPE="button" VALUE="Create Window" ONCLICK="create(this.form)"&gt;
&lt;/CENTER&gt;
&lt;/FORM&gt;
&lt;/BLOCKQUOTE&gt;
&lt;/CENTER&gt;

 

&lt;!-- Script Size:  3.67 KB  --&gt;
</textarea><br><font FACE="helvetica,arial,geneva"></font></td></tr>

</table>
</form>
</FONT>
</CENTER>


</center>
</body></html>